package cn.pomit.springbootwork.eurekaclient.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cn.pomit.springbootwork.eurekaclient.model.ResultModel;
import cn.pomit.springbootwork.eurekaclient.service.IpInfoService;

@RestController
@RequestMapping("/eurekaClient")
public class EurekaClientRest {
	@Autowired
	IpInfoService ipInfoService;

	@RequestMapping(value = "/test", method = { RequestMethod.GET })
	public String test() {
		return "Hello, Hello";
	}

	@RequestMapping(value = "/ip", method = { RequestMethod.GET })
	public ResultModel ip() {
		return ipInfoService.getIpInfo();
	}
}
